package com.mouse.damo.util;

import com.jacob.com.Variant;

/**
 * Com反射变量
 */
public class VarUtil {
    /**
     * 反射变量，当obj为null，表示为指针传值
     * @param objs
     * @return
     */
    public static Variant[] getVars(Object... objs) {
        Variant[] variants = new Variant[objs.length];
        for (int i = 0; i < objs.length; i++) {
            if (objs[i] == null) {
                variants[i] = new Variant(0, true);
            } else {
                variants[i] = new Variant(objs[i]);
            }
        }
        return variants;
    }
}
